<template>
	<view class="product" @click="productDetail">
		<view class="product-img">
			<image src="https://img.quanminyanxuan.com/other/f41c007f65fe48269eb8d876a0e67a57.jpg" mode="widthFix"></image>
		</view>
		<view class="product-info">
			<view class="product-name line2">【8K高清】双摄像头超广角折叠航拍无人机 出行智能跟拍</view>
			<view class="label">
				<label class="label1">
					<uni-icons type="hand-up-filled" size="13" color="#fff" style="margin-right: 5rpx;"></uni-icons>
					超值兑
				</label>
				<label class="label2">商品</label>
			</view>
			<view class="product-price">
				<label>12000积分 </label>+120元
			</view>
			<view class="product-purchase">
				<uni-icons type="fire-filled" size="13" color="#FF162E" style="margin-right: 5rpx;"></uni-icons>
				8.4万人已兑换
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"product-item",
		data() {
			return {
				
			};
		},
		methods:{
			productDetail(){
				this.$uniGo("navigateTo",{
					url:"/pages/detail/detail",
					success: () => {
						console.log("成功")
					}
				})
				// uni.navigateTo({
				// 	url:"/pages/detail/detail",
				// 	success: () => {
				// 		console.log("成功")
				// 	}
				// })
			}
		}
	}
</script>

<style lang="scss" scoped>
	.product{
		// width: 49.2%;
		margin-bottom: 15rpx;
		background: #fff;
		border-radius: 5rpx;
		// overflow: hidden;
		.product-img{
			width: 100%;
			height: 46.6vw;	
			border-radius: 5rpx;
			overflow: hidden;
			image{
				width: 100%;
				height: auto;
			}
		}
		.product-info{
			padding: 20rpx;
			.product-name{
				font-size: 28rpx;
			}
			.label{
				margin: 20rpx 0;
				label{
					padding: 2rpx 10rpx;
					font-size: $uni-font-size-sm;
					display: inline-block;
					border-radius: 5rpx;					
				}
				.label1{
					color: $uni-text-color-inverse;
					background-color: $theme-color;
					margin-right: 15rpx;
				}
				.label2{
					color: $uni-text-color-grey;
					border: 1rpx solid $uni-text-color-grey;
				}
			}
			.product-price{
				color: $theme-color;
				font-size: $uni-font-size-sm;
				label{
					font-weight: bold;
					font-size: $uni-font-size-lg;
				}
			}
			.product-purchase{
				margin-top: 20rpx;
				color: $uni-text-color-grey;
				font-size: $uni-font-size-sm;
			}
		}
	}
</style>